﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 生产报工基础输入参数
/// </summary>
public class productionreportBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 工单号
    /// </summary>
    public virtual string? workordernumber { get; set; }
    
    /// <summary>
    /// 工序编码
    /// </summary>
    public virtual long? procedurecode { get; set; }
    
    /// <summary>
    /// 工序名称
    /// </summary>
    public virtual long? processname { get; set; }
    
    /// <summary>
    /// 产品编码
    /// </summary>
    public virtual long? productcode { get; set; }
    
    /// <summary>
    /// 产品名称
    /// </summary>
    public virtual long? productname { get; set; }
    
    /// <summary>
    /// 产品规格
    /// </summary>
    public virtual long? productspecification { get; set; }
    
    /// <summary>
    /// 报工数量
    /// </summary>
    public virtual int? quantityreported { get; set; }
    
    /// <summary>
    /// 合格数量
    /// </summary>
    public virtual int? qualifiedquantity { get; set; }
    
    /// <summary>
    /// 不合格数量
    /// </summary>
    public virtual int? unqualifiedquantity { get; set; }
    
    /// <summary>
    /// 附件
    /// </summary>
    public virtual string? attachments { get; set; }
    
}

/// <summary>
/// 生产报工分页查询输入参数
/// </summary>
public class PageproductionreportInput : BasePageInput
{
    /// <summary>
    /// 报工单号
    /// </summary>
    public string? reportnumber { get; set; }
    
    /// <summary>
    /// 时间范围
    /// </summary>
     public DateTime?[] reporttimeRange { get; set; }
    
    /// <summary>
    /// 工单号
    /// </summary>
    public string? workordernumber { get; set; }
    
    /// <summary>
    /// 工序编码
    /// </summary>
    public long? procedurecode { get; set; }
    
    /// <summary>
    /// 工序名称
    /// </summary>
    public long? processname { get; set; }
    
    /// <summary>
    /// 产品编码
    /// </summary>
    public long? productcode { get; set; }
    
    /// <summary>
    /// 产品名称
    /// </summary>
    public long? productname { get; set; }
    
    /// <summary>
    /// 产品规格
    /// </summary>
    public long? productspecification { get; set; }
    
    /// <summary>
    /// 生产人员
    /// </summary>
    public string? productionpersonnel { get; set; }
    
    /// <summary>
    /// 生产时间范围
    /// </summary>
     public DateTime?[] productiontimeRange { get; set; }
    
    /// <summary>
    /// 报工数量
    /// </summary>
    public int? quantityreported { get; set; }
    
    /// <summary>
    /// 合格数量
    /// </summary>
    public int? qualifiedquantity { get; set; }
    
    /// <summary>
    /// 不合格数量
    /// </summary>
    public int? unqualifiedquantity { get; set; }
    
    /// <summary>
    /// 附件
    /// </summary>
    public string? attachments { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 生产报工增加输入参数
/// </summary>
public class AddproductionreportInput
{
    /// <summary>
    /// 工单号
    /// </summary>
    [MaxLength(100, ErrorMessage = "工单号字符长度不能超过100")]
    public string? workordernumber { get; set; }
    
    /// <summary>
    /// 工序编码
    /// </summary>
    public long? procedurecode { get; set; }
    
    /// <summary>
    /// 工序名称
    /// </summary>
    public long? processname { get; set; }
    
    /// <summary>
    /// 产品编码
    /// </summary>
    public long? productcode { get; set; }
    
    /// <summary>
    /// 产品名称
    /// </summary>
    public long? productname { get; set; }
    
    /// <summary>
    /// 产品规格
    /// </summary>
    public long? productspecification { get; set; }
    
    /// <summary>
    /// 报工数量
    /// </summary>
    public int? quantityreported { get; set; }
    
    /// <summary>
    /// 合格数量
    /// </summary>
    public int? qualifiedquantity { get; set; }
    
    /// <summary>
    /// 不合格数量
    /// </summary>
    public int? unqualifiedquantity { get; set; }
    
    /// <summary>
    /// 附件
    /// </summary>
    [MaxLength(32, ErrorMessage = "附件字符长度不能超过32")]
    public string? attachments { get; set; }
    
}

/// <summary>
/// 生产报工删除输入参数
/// </summary>
public class DeleteproductionreportInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 生产报工更新输入参数
/// </summary>
public class UpdateproductionreportInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 工单号
    /// </summary>    
    [MaxLength(100, ErrorMessage = "工单号字符长度不能超过100")]
    public string? workordernumber { get; set; }
    
    /// <summary>
    /// 工序编码
    /// </summary>    
    public long? procedurecode { get; set; }
    
    /// <summary>
    /// 工序名称
    /// </summary>    
    public long? processname { get; set; }
    
    /// <summary>
    /// 产品编码
    /// </summary>    
    public long? productcode { get; set; }
    
    /// <summary>
    /// 产品名称
    /// </summary>    
    public long? productname { get; set; }
    
    /// <summary>
    /// 产品规格
    /// </summary>    
    public long? productspecification { get; set; }
    
    /// <summary>
    /// 报工数量
    /// </summary>    
    public int? quantityreported { get; set; }
    
    /// <summary>
    /// 合格数量
    /// </summary>    
    public int? qualifiedquantity { get; set; }
    
    /// <summary>
    /// 不合格数量
    /// </summary>    
    public int? unqualifiedquantity { get; set; }
    
    /// <summary>
    /// 附件
    /// </summary>    
    [MaxLength(32, ErrorMessage = "附件字符长度不能超过32")]
    public string? attachments { get; set; }
    
}

/// <summary>
/// 生产报工主键查询输入参数
/// </summary>
public class QueryByIdproductionreportInput : DeleteproductionreportInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataproductionreportInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 生产报工数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportproductionreportInput : BaseImportInput
{
    /// <summary>
    /// 报工单号
    /// </summary>
    [ImporterHeader(Name = "报工单号")]
    [ExporterHeader("报工单号", Format = "", Width = 25, IsBold = true)]
    public string? reportnumber { get; set; }
    
    /// <summary>
    /// 时间
    /// </summary>
    [ImporterHeader(Name = "时间")]
    [ExporterHeader("时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? reporttime { get; set; }
    
    /// <summary>
    /// 工单号
    /// </summary>
    [ImporterHeader(Name = "工单号")]
    [ExporterHeader("工单号", Format = "", Width = 25, IsBold = true)]
    public string? workordernumber { get; set; }
    
    /// <summary>
    /// 工序编码 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? procedurecode { get; set; }
    
    /// <summary>
    /// 工序编码 文本
    /// </summary>
    [ImporterHeader(Name = "工序编码")]
    [ExporterHeader("工序编码", Format = "", Width = 25, IsBold = true)]
    public string procedurecodeFkDisplayName { get; set; }
    
    /// <summary>
    /// 工序名称 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? processname { get; set; }
    
    /// <summary>
    /// 工序名称 文本
    /// </summary>
    [ImporterHeader(Name = "工序名称")]
    [ExporterHeader("工序名称", Format = "", Width = 25, IsBold = true)]
    public string processnameFkDisplayName { get; set; }
    
    /// <summary>
    /// 产品编码 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? productcode { get; set; }
    
    /// <summary>
    /// 产品编码 文本
    /// </summary>
    [ImporterHeader(Name = "产品编码")]
    [ExporterHeader("产品编码", Format = "", Width = 25, IsBold = true)]
    public string productcodeFkDisplayName { get; set; }
    
    /// <summary>
    /// 产品名称 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? productname { get; set; }
    
    /// <summary>
    /// 产品名称 文本
    /// </summary>
    [ImporterHeader(Name = "产品名称")]
    [ExporterHeader("产品名称", Format = "", Width = 25, IsBold = true)]
    public string productnameFkDisplayName { get; set; }
    
    /// <summary>
    /// 产品规格 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? productspecification { get; set; }
    
    /// <summary>
    /// 产品规格 文本
    /// </summary>
    [ImporterHeader(Name = "产品规格")]
    [ExporterHeader("产品规格", Format = "", Width = 25, IsBold = true)]
    public string productspecificationFkDisplayName { get; set; }
    
    /// <summary>
    /// 生产人员
    /// </summary>
    [ImporterHeader(Name = "生产人员")]
    [ExporterHeader("生产人员", Format = "", Width = 25, IsBold = true)]
    public string? productionpersonnel { get; set; }
    
    /// <summary>
    /// 生产时间
    /// </summary>
    [ImporterHeader(Name = "生产时间")]
    [ExporterHeader("生产时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? productiontime { get; set; }
    
    /// <summary>
    /// 报工数量
    /// </summary>
    [ImporterHeader(Name = "报工数量")]
    [ExporterHeader("报工数量", Format = "", Width = 25, IsBold = true)]
    public int? quantityreported { get; set; }
    
    /// <summary>
    /// 合格数量
    /// </summary>
    [ImporterHeader(Name = "合格数量")]
    [ExporterHeader("合格数量", Format = "", Width = 25, IsBold = true)]
    public int? qualifiedquantity { get; set; }
    
    /// <summary>
    /// 不合格数量
    /// </summary>
    [ImporterHeader(Name = "不合格数量")]
    [ExporterHeader("不合格数量", Format = "", Width = 25, IsBold = true)]
    public int? unqualifiedquantity { get; set; }
    
    /// <summary>
    /// 附件
    /// </summary>
    [ImporterHeader(Name = "附件")]
    [ExporterHeader("附件", Format = "", Width = 25, IsBold = true)]
    public string? attachments { get; set; }
    
}
